xsm: Fix xsm_mmu_* and xsm_update_va_mapping hooks
authorStephen Smalley <sds@tycho.nsa.gov>
Tue, 12 Apr 2011 13:55:25 +0000 (14:55 +0100)
committerStephen Smalley <sds@tycho.nsa.gov>
Tue, 12 Apr 2011 13:55:25 +0000 (14:55 +0100)
commitad17ef1932d8c2be57ba3af4f6dc95607c6a629a
treefaac7a078edbd4d3851e3ea2e889d320d311e42a
parent1e7545fd7cf40876121ab3ce185c90e555a81dc2
xsm: Fix xsm_mmu_* and xsm_update_va_mapping hooks

This is an attempt to properly fix the hypervisor crash previously
described in
http://marc.info/?l=xen-devel&m=128396289707362&w=2

In looking into this issue, I think the proper fix is to move the
xsm_mmu_* and xsm_update_va_mapping hook calls later in the callers,
after more validation has been performed and the page_info struct is
readily available, and pass the page_info to the hooks. This patch
moves the xsm_mmu_normal_update, xsm_mmu_machphys_update and
xsm_update_va_mapping hook calls accordingly, and updates their
interfaces and hook function implementations.  This appears to resolve
the crashes for me.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
xen/arch/x86/mm.c
xen/include/xsm/xsm.h
xen/xsm/dummy.c
xen/xsm/flask/hooks.c